﻿using System;

namespace 语言用法
{
    class Program
    {
        static void Main(string[] args)
        {
            const double PI = 3.14;
            int r = 2;
            double Perimeter = 2 * PI * r * r;
            double Ared = PI * r * r;
            Console.WriteLine("圆的周长=" + Perimeter);
            Console.WriteLine("圆的面积=" + Ared);

            string studentName = "小胖";
            Console.WriteLine("程序员：" + studentName);

            //一个分支的判断语句
            Boolean sum = 10 < 20;
            if(sum){
                Console.WriteLine("棒");
            }
            //两个分支的判断语句
            int res = 30;
            if(res<10){
                Console.WriteLine("小于10");
            }
            else
            {
                Console.WriteLine("大于等于10");
            }

            //多个分支的判断语句
            int GameLevel = 60;
            if (GameLevel < 10)
            {
                Console.WriteLine("新手玩家");
            }
            else if (GameLevel < 20)
            {
                Console.WriteLine("初级玩家");
            }else if (GameLevel < 50)
            {
                Console.WriteLine("进阶玩家");
            }
            else
            {
                Console.WriteLine("高级玩家");
            }

            //switch case语句
            Console.WriteLine("请输入学生考试成绩：");
            int points = int.Parse(Console.ReadLine());
            switch (points / 10)
            {
                case 10:
                    Console.WriteLine("超级棒");
                    break;
                case 9:
                    Console.WriteLine("很棒");
                    break;
                case 8:
                    Console.WriteLine("棒");
                    break;
                case 7:
                    Console.WriteLine("不错");
                    break;
                case 6:
                    Console.WriteLine("还行");
                    break;
                default:
                    Console.WriteLine("要加油哦！！");
                    break;
            }
        }
        class Judge
        {

        }


        class Student
        {
            string AddUser = "小小胖";

        }
    }
}
